The present invention relates to a method and apparatus for encoding and decoding digital images including transcoding to and from other compression formats. The present invention is not limited to still image technologies and may also be used in video image technologies.
The JPEG compression standard is a widely used image compression method, particularly in its baseline JPEG mode. There are many other modes of JPEG, some of which offer greater compression, but such modes are usually more complex than baseline JPEG. JPEG has many desirable features, not the least of which is the substantially separate coding of 8xc3x978 blocks of pixels. This means that only 8xc3x978 blocks of pixels need to be buffered in memory (or possibly 8 lines of pixels in a hardware implementation). This low memory buffering requirement leads to relatively inexpensive hardware solutions and fast software execution speed.
There is a new generation of image compression methods, generally based on the wavelet transform, that offer improved compression performance over JPEG. However, these new methods generally have much larger memory buffering requirements.
It is an object of the present invention to provide an alternate image compression method.
One or more exemplary aspects of the invention are listed below, but are not limited thereto.
According to one aspect of the invention there is provided a method of representing a digital image to provide a coded representation, said method including the steps of:
(a) dividing said digital image into a number of blocks of pixels;
(b) transforming each block of pixels to derive a block of transform coefficients, each transform coefficient represented by a predefined bit sequence;
(c) selecting each block of transform coefficients in turn as a region and setting a predetermined maximum bit plane as the current bit plane;
(d) scanning the significance of each bitplane of said selected region from said current bitplane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded representation until a significant bitplane is determined and setting said determined significant bitplane as the current bitplane;
(e) partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
(f) repeating steps (d) and (e) for each selected region in turn, commencing from said current bit plane until the predetermined minimum bitplane has been reached, or said selected region has a predetermined size, and coding said transform coefficients of said selected region and providing said coded transform coefficients in said coded representation.
According to another aspect of the invention there is provided an apparatus for representing a digital image to provide a coded representation, said apparatus including:
means for dividing said digital image into a number of blocks of pixels,
means for transforming each block of pixels to derive a block of transform coefficients, each coefficient represented by a predefined bit sequence;
means for selecting each block of transform coefficients in turn as a region and setting a predetermined maximum bitplane as the current bitplane;
means for scanning the significance of each bitplane of said selected region from said current bitplane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded representation until a significant bitplane is determined and setting said determined bitplane as the current bitplane;
means for partitioning said selected region into two or more subregions having a predetermined form and setting each of said subregions as said selected region;
means for controlling said scanning means and said partitioning means to carry out respective functioning of said scanning and partitioning means commencing from said current bitplane until the predetermined minimum bitplane has been reached, or said selected region has a predetermined size, and for coding said transform coefficients of said selected region and providing said coded transform coefficients in said coded representation.
According to still another aspect of the invention there is provided a computer program product including a computer readable medium having recorded thereon a computer program for representing a digital image to provide a coded representation, said computer program product including:
means for dividing said digital image into a number of blocks of pixels,
means for transforming each block of pixels to derive a block of transform coefficients, each coefficient represented by a predefined bit sequence;
means for selecting each block of transform coefficients in turn as a region and setting a predetermined maximum bitplane as current bitplane;
means for scanning the significance of each bitplane of said selected region from said current bitplane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded representation until significant bitplane is determined and setting said determined bitplane as the current bitplane;
means for partitioning said selected region into two or more subregions having a predetermining form, and setting each of said subregions as said selected region;
means for controlling said scanning means and said partitioning means to carry out respective functioning of said scanning and partitioning means commencing from said current bitplane until the predetermined minimum bitplane has been reached, or said selected region has a predetermined size, and for coding said transform coefficients of said selected region and providing said coded transform coefficients in said coded representation.
According to still another aspect of the invention there is provide a method for decoding a coded representation of a digital image consisting of a number of blocks of pixels having associated therewith blocks of transform coefficients, said method including the steps of:
(a) selecting each block of transform coefficients as a region;
(b) scanning said coded representation associated with said selected region, said coded representation including a first token for each insignificant bitplane of said coefficients, a second token for each significant bitplane of said coefficients, and zero or more coded coefficients;
(c) if a first token is determined, providing an insignificant bitplane in an output stream for a current bitplane of coefficients of said selected region;
(d) if a second token is determined, provided a significant bitplane in said output stream for said current bitplane of said coefficients of said selected region and partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
(e) repeating steps (b) to (d) commencing from a predetermined bitplane until a predetermined minimum bit plane has been reached, or until said selected region has a predetermined size wherein a coded transform coefficient of said selected region is decoded and provided in an output block of transform coefficients;
(f) inverse transforming each said output block of transform coefficients to derive a said block of pixels; and
(g) combining said blocks of pixels to reconstitute the digital image.
According to still another aspect of the invention there is provided an apparatus for decoding a coded representation of a digital image consisting of a number of blocks of pixels having associated therewith blocks of transform coefficients, said apparatus including:
means for selecting each block of transform of coefficients as a region;
means for scanning said coded representation of said selected region, said coded representation including a first token for each insignificant bitplane of said coefficients, a second token for each significant bitplane of said coefficients, and zero or more coded coefficients;
means for, if a first token is determined, providing an insignificant bitplane in an output stream for a current bitplane of coefficients of said selected region;
means for, if a second token is determined, providing a significant bitplane in said output stream for said current bitplane of said coefficients of said selected region and partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
means for controlling said scanning means, said means for providing said insignificant bitplane, and means for providing said significant bitplane commencing from a predetermined bitplane until a predetermined minimum bit plane has been reached, or until said selected region has a predetermined size wherein a coded coefficient of said selected region is decoded and provided in said output stream.
means for inverse transforming each said output block of transform coefficients to derive a said block of pixels; and
means for combining said blocks of pixels to reconstitute the digital image.
According to still another aspect of the invention there is provided a computer program product including a computer readable medium having recorded thereon a computer program for decoding a coded representation of a digital image, said computer program product comprising:
means for selecting each block of transform coefficients as a region;
means for scanning said coded representation of said selected region, said coded representation including a first token for each insignificant bitplane of said coefficients, a second token for each significant bitplane of said coefficients, and zero or more coded coefficients;
means for, if a first token is determined, providing an insignificant bitplane in an output stream for a current bitplane of coefficients of said selected region;
means for, if a second token is determined, providing a significant bitplane in said output stream for said current bitplane of said coefficients of said selected region and partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
means for controlling said scanning means, said means for providing said insignificant bitplane, and said means for providing said significant bitplane commencing from a predetermined bitplane until a predetermined minimum bit plane has been reached, or until said selected region has a predetermined size wherein a coded coefficient of said selected region is decoded and provided in said output stream;
means for inverse transforming each said output block of transform coefficients to derive a said block of pixels; and means for combining said blocks of pixels to reconstitute the digital image.
According to still another aspect of the invention there is provided a method of transcoding a JPEG encoded digital image to provide a coded representation in another format; said method including the following steps:
(a) entropy decoding the JPEG digital image to generate blocks of quantised transform coefficients;
(b) selecting each block of transform coefficients in turn as a region and setting a predetermined maximum bit plane as the current bit plane;
(c) scanning the significance of each bitplane of said selected region from said current bitplane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded representation until a significant bitplane is determined and setting said determined significant bitplane as the current bitplane;
(d) partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
(e) repeating steps (c) and (d) for each selected region in turn, commencing from said current bit plane until the predetermined minimum bitplane has been reached, or said selected region has a predetermined size, and coding said transform coefficients of said selected region and providing said coded transform coefficients in said coded representation.
According to still another aspect of the invention there is provided an apparatus for transcoding a JPEG encoded digital image to provide a coded representation in another format; said apparatus including;
means from entropy decoding the JPEG digital image to generate blocks of quantised transform coefficients;
means for selecting each block of transform coefficients in turn as a region and setting a predetermined maximum bitplane as the current bitplane;
means for scanning the significance of each bitplane of said selected region from said current bitplane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded representation until a significant bitplane is determined and setting said determined bitplane as the current bitplane;
means for partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region:
means for controlling said scanning means and said partitioning means to carry out respective functioning of said scanning and partitioning means commencing from said current bitplane until the predetermined minimum bitplane has been reached, or said selected region has a predetermined size, and for coding said transform coefficients of said selected region and providing said coded transform coefficients in said coded representation.
According to still another aspect of the invention there is provided a computer program product including a computer readable medium having recorded thereon a computer program for transcoding a JPEG encoded digital image to provide a coded representation in another format; said computer program product including;
means for entropy decoding the JPEG digital image to generate blocks of quantised transform coefficients;
means for selecting each block of transform coefficients in turn as a region and setting a predetermined maximum bitplane as the current bitplane;
means for scanning the significance of each bitplane of said selected region from said current bitplane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded representation until a significant bitplane is determined and setting said determined bitplane as the current bitplane;
means for partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
means for controlling said scanning means and said partitioning means to carry out respective functioning of said scanning and partitioning means commencing from said current bitplane until the predetermined minimum bitplane has been reached, or said selected region has a predetermined size, and for coding said transform coefficients of said selected region and providing said coded transform coefficients in said coded representation.
According to still another aspect of the invention there is provided a method of transcoding a coded representation of a digital image consisting of a number of blocks of pixels having associated therewith blocks of transform coefficients to a JPEG encoded image; said method including the following steps;
(a) selecting a block of transform coefficients as a region;
(b) scanning said coded representation associated with said selected region, said coded representation including a first token for each insignificant bitplane of said coefficients, a second token for each significant bitplane of said coefficients, and zero or more coded coefficients:
(c) if a first token is determined, providing an insignificant bitplane in an output stream for a current bitplane of coefficients of said selected region:
(d) if a second token is determined, providing a significant bitplane in said output stream for said current bitplane of said coefficients of said selected region and partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
(e) repeating steps (b) and (d) commencing from a predetermined bitplane until a predetermined minimum bit plane has been reached, or until said selected region has a predetermined size wherein a coded transform coefficient of said selected region is decoded and provided in an output block of transform coefficients;
(f) entropy coding each said output block of transform coefficients to derive said JPEG encoded image.
According to still another aspect of the invention there is provided an apparatus for transcoding a coded representation of a digital image consisting of a number of blocks of pixels having associated therewith blocks of transform coefficients to a JPEG encoded image; said apparatus including;
means for selecting a block of transform coefficients as a region;
means for scanning said coded representation associated with said selected region, said coded representation including a first token for each insignificant bitplane of said coefficients, a second token for each significant bitplane of said coefficients, and zero or more coded coefficients;
means for, if a first token is determined, providing an insignificant bitplane in an output stream for a current bitplane of coefficients of said selected region;
means for, if a second token is determined, providing a significant bitplane in said output stream for said current bitplane of said coefficients of said selected region and partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
means for controlling said scanning means, said means for providing said insignificant bitplane, and said means for providing said significant bitplane commencing from a predetermined bitplane until a predetermined minimum bit plane has been reached, or until said selected region has a predetermined size wherein a coded coefficient of said selected region is decoded and provided in said output steam; and
means for entropy coding each said output block of transform coefficients to derive said JPEG encoded image. According to still another aspect of the invention there is provided a computer program product including a computer readable medium having recorded thereon a computer program for transcoding a coded representation of a digital image consisting of a number of blocks of pixels having associated therewith blocks of transform coefficients to a JPEG encoded image; said computer program product including;
means for selecting a block of transform coefficients as a region;
means for scanning said coded representation associated with said selected region, said coded representation including a first token for each insignificant bitplane of said coefficients, a second token for each significant bitplane of said coefficients, and zero or more coded coefficients;
means for, if a first token is determined, providing an insignificant bitplane in an output stream for a current bitplane of coefficients of said selected region;
means for, if a second token is determined, providing a significant bitplane in said output stream for said current bitplane of said coefficients of said selected region and partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region; means for controlling said scanning means, said means for providing said insignificant bitplane, and said means for providing said significant bitplane commencing from a predetermined bitplane until a predetermined minimum bit plane has been reached, or until said selected region has a predetermined size wherein a coded coefficient of said selected region is decoded and provided in said output stream; and
means for entropy coding each said output block of transform coefficients to derive said JPEG encoded image.
According to still another aspect of the invention there is provided a method of representing a digital image to provide a coded binary representation, said method including steps of:
(a) dividing said digital image into a number of blocks of pixels;
(b) transforming each block of pixels to derive a block of transform coefficients, each transform coefficient represented by a predefined bit sequence;
(c) selecting each block of transform coefficients in turn as a region and setting a predetermined significant bit plane as the current bit plane;
(d) scanning the significance of each bitplane of said selected region from the current bit plane towards a predetermined minimum bitplane, and providing a first token for each insignificant bitplane and a second token for a significant bitplane in said coded binary representation until a significant bitplane is determined and setting said determined significant bit plane as the current bit plane;
(e) partitioning said selected region into two or more subregions having a predetermined form, and setting each of said subregions as said selected region;
(f) repeating steps (d) and (e) for each selected region in turn, commencing from said current bit plane until the predetermined minimum bit plane has been reached, or said selected region has only one transform coefficient and in the event of the latter coding said one transform coefficient by performing the following steps;
(i) summing the magnitude of said one transform coefficient and 2minBitNumber
(ii) outputting a bit sequence from currentBitNumber to minBitNumber inclusive of said sum, if by doing so the most significant bit of said sum does not exceed the currentBitNumber, otherwise outputting a bit sequence from the currentBitNumber to the minBitNumber inclusive of said one transform coefficient, wherein the minimum bit plane has a bit number minBitNumber which is an integer greater than zero and the current bitplane has a bit number currentBitNumber.